﻿using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using TT.Logic.Entities;

namespace TT.Logic.Interfaces
{
    /// <summary>
    /// Represents data-access context used by TT app.    
    /// </summary>
    public interface ITTContext
    {
        IDbSet<Match> Matches { get; set; }
        IDbSet<Player> Players { get; set; }
        IDbSet<TT.Logic.Entities.Tournament> Tournaments { get; set; }
        IDbSet<Round> Rounds { get; set; }

        DbEntityEntry Entry(object entity);
        DbEntityEntry<TEntity> Entry<TEntity>(TEntity entity) where TEntity : class;

        int SaveChanges();
    }
}
